<template>
  <!-- <div class="header" @click="changeTheme">
    <div class="header-left"></div>
    <p class="header-title">塔普利斯的音乐</p>
    <div class="header-right" @click.stop="accountClick"></div>
  </div> -->
  <div class="header" @click="changeTheme">
    <div class="left">
      <slot name="left">左边</slot>
    </div>
    <slot name="center">中间</slot>
    <div class="right">
      <slot name="right">右边</slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Header',
  data () {
    return {
      themes: ['theme', 'theme1', 'theme2'],
      index: 0
    }
  },
  methods: {
    changeTheme () {
      this.index = this.index >= this.themes.length - 1 ? 0 : this.index + 1
      document.documentElement.setAttribute('data-theme', this.themes[this.index])
    },
    accountClick () {
      this.$router.push('./account')
    }
  }
}
</script>

<style scoped lang='scss'>
@import "../assets/css/variable";
@import "../assets/css/mixin";
.header {
  width: 100%;
  height: 100px;
  @include bg_color();
  display: flex;
  justify-content: space-between;
  position: relative;
  .left,
  .right {
    width: 84px;
    height: 84px;
    margin-top: 8px;
    *{
      width: 100%;
      height: 100%;
    }
  }
  // .header-left {
  //   @include bg_img("../assets/images/logo");
  // }
  // .header-right {
  //   @include bg_img("../assets/images/account");
  // }
  // .header-title {
  //   text-align: center;
  //   line-height: 100px;
  //   color: white;
  //   font-weight: bold;
  //   @include font_size($font_medium);
  // }
}
</style>
